from django.contrib import admin
from django.urls import path,include
from .views import All_index,Small_gen,Total_gen,PAGE_download,download_file,Upload_Sy,Automatic_Process,Automatic_Process_middlesite
from .views import Progress_bar_ajax,Progreass_bar_html
app_name="generate_yaml"
urlpatterns=[
    path("",All_index,name="index"),
    path('SY/',include([
        path("",Small_gen,name="small_gener"),
        # path("Download/<file_name>/", S_download, name="S_download"),
    ])),
    path("PAGE_Download/<file_name>/",PAGE_download,name="download_page"),
    path('TY/',include([
        path("",Upload_Sy,name='total_gener'),
        path("middle_site/",Total_gen,name="middle_site")
        # path("Download/<file_name>/",S_download,name="T_download"),
    ])),
    # path("TY/",Big_gen,name="Big_gener"),
    # path('Auto_process/',Automatic_Process,name="Automatic_Process"),
    path('Auto_process/', include([
        path("", Automatic_Process, name="Automatic_Process"),
        path("Automatic_Process_middlesite/", Automatic_Process_middlesite, name="Auto_middle_site"),
        path("Automatic_Process_middlesite/action/", Progress_bar_ajax, name="progress_bar_ajax"),
        path('Automatic_Process_middlesite/Progress_bar/',Progreass_bar_html, name="progress_bar_html"),
    ])),
    path("Download/",download_file,name="real_download"),
    #进度条处理函数
    # path('Progress_bar/',include([
    #     path("", Progreass_bar_html, name="progress_bar_html"),
    #     # path("action/", Progress_bar_ajax, name="progress_bar_ajax"),
    # ]))
    # path("Progress_bar/",Progreass_bar_html,name="progress_bar_html"),
    # path("Progress_bar/action",Progress_bar_ajax,name="progress_bar_ajax"),
]